let order  = require("../model/order");
module.exports = {
    add:(data)=>{
        return order.insertMany([data]);
    },
    query:(data)=>{
        return order.find(data);
    },
    getall:()=>{
        return order.find();
    },
    insertmany:(data)=>{
        return order.insertMany(data)
    },
    update:(data,params)=>{
        return order.updateOne(params,{$set:data})
    },
    delete:(params)=>{
        return order.remove(params)
    }
}